class UserTests extends GroovyTestCase {

    void testValid() {
		def b = new User(login:"loginTest", name:"Testing User", email:"user@testing.com", password:"somepassword")
        assert b.myValidate()
    }
    void testUpdate(){
    	def b = new User(login:"loginTest", name:"Testing User", email:"user@testing.com", password:"somepassword")
    	b.setLogin("changed")
    	b.setName("changed")
    	b.setEmail("changed")
    	b.setPassword("changed")
		assertEquals "changed", b.getLogin()
		assertEquals "changed", b.getName()
		assertEquals "changed", b.getEmail()				
		assertEquals "changed", b.getPassword()		
    }
}